package com.zhong.gang.app.ui.zhuchang.changsure;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import com.zhong.gang.app.R;
import com.zhong.gang.app.databinding.ActivityFaHuoChangBinding;
import com.zhong.gang.applib.base.act.ActBase;

public class FaHuoChangAct extends ActBase<ActivityFaHuoChangBinding> {
    private static final String ID = "ID";
    private SureOrderPersenter persenter;
    public static final void openAct(Context context,int id){
        Intent intent = new Intent(context,FaHuoChangAct.class);
        intent.putExtra(ID,id);
        context.startActivity(intent);
    }

    @Override
    public boolean showLoading() {
        return true;
    }

    @Override
    public int LayoutRes() {
        return R.layout.activity_fa_huo_chang;
    }

    @NonNull
    @Override
    public String CreateTitle() {
        return "到厂确认";
    }

    @Override
    public void initView() {
        persenter = new SureOrderPersenter(this,getIntent().getIntExtra(ID,0));
        getData();
    }

    @Override
    public void getData() {
        super.getData();
        persenter.getDetail(getIntent().getIntExtra(ID,0));
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        persenter.onActivityResult(requestCode,resultCode,data);
    }
}
